package com.wgke.bluetooth.vm;

import android.Manifest;
import android.annotation.SuppressLint;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothGattService;
import android.bluetooth.BluetoothProfile;
import android.content.pm.PackageManager;

import androidx.core.app.ActivityCompat;
import androidx.lifecycle.MutableLiveData;

import com.wgke.bluetooth.event.EventBean;
import com.wgke.bluetooth.utils.BluetoothGattManager;
import com.wgke.bluetooth.utils.CommonUtil;

import org.greenrobot.eventbus.EventBus;

import java.util.List;
import java.util.UUID;

public class HomeVM extends BaseVM {
    public MutableLiveData<String> chooseAddress = new MutableLiveData<>("");

    public void connectDevice(BluetoothDevice device) {
        if (Boolean.TRUE.equals(isShowLoading.getValue())) return;
        isShowLoading.postValue(true);
        BluetoothGattManager.getInstance().connectDevice(device);
    }

}
